﻿using System;

namespace Program18
{
    class Program
    {


        static void Main(string[] args)
        {
            int[] arr = new int[] { 1, 3, 5, 7, 9, 10, 21, 31, 46, 88, 97 };
            int arrMin = arr[0];
            int arrMax = arr[0];
            int arrSum = 0;
            int arrAverage = 0;
            for (int i = 0; i < arr.Length; i++)
            {
                if (arr[i] > arrMax) 
                {
                    arrMax = arr[i];
                }
                if (arr[i] < arrMin) 
                {
                    arrMin = arr[i];
                }
                arrSum += arr[i];
                arrAverage = arrSum / arr.Length;
            }
            

            Console.WriteLine("最大值{0},最小值:{1},平均值:{2},总和:{3}",arrMax,arrMin,arrAverage,arrSum);
        }
    }
}
